import request from '@/router/axios';

export const getList = (current, size, params) => {
  return request({
    url: '/api/rb-oem/oem/iot/iot_recharge/list',
    method: 'get',
    params: {
      ...params,
      current,
      size
    }
  })
}
export const getListCount = (params) => {
  return request({
    url: '/api/rb-oem/oem/iot/iot_recharge/statistics',
    method: 'get',
    params: {
      ...params
    }
  })
}

/* 版本号管理 导出 */
export const getExport = (params) => {
  return request({
    headers: {
      "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
    },
    responseType: 'blob',
    url: '/api/rb-oem/oem/iot/iot_recharge/export',
    method: 'get',
    params: {
      ...params
    }
  })
}

/* 申请退款 */
export const refundOrder = (row) => {
  return request({
    url: '/api/rb-oem/oem/iot/iot_increment/refund',
    method: 'post',
    data: row
  })
}

/* 已有数据回显接口 */
export const apiParam = (params) => {
  return request({
    url: '/api/rb-oem/oem/iot/iot_recharge/param',
    method: 'get',
    params: {
      ...params
    }
  })
}

/* 瑞生意支付API所需参数 */
export const apiEditParam = (row) => {
  return request({
    url: '/api/rb-oem/oem/iot/iot_recharge/editParam',
    method: 'post',
    data: row
  })
}